#import "CuriousEchoesCell.h"


@implementation CuriousEchoesCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
	if (self) {

		self.selectionStyle = UITableViewCellSelectionStyleNone;
		//self.contentView.backgroundColor = UIColor.whiteColor;

		//: 初始化UI布局
		[self journeyQuiverConfigViews];
	}
	return self;
}

- (void)setQuixoticLuminescence:(CuriousEchoesModel *)quixoticLuminescence {
	_quixoticLuminescence = quixoticLuminescence;

	//: 配置cell的UI

	self.joyfulWonderLabel.text = quixoticLuminescence.xenophobeWindfall;

	[self.insectZealotNomadImageView sd_setImageWithURL:[NSURL URLWithString:quixoticLuminescence.thistleOnward] placeholderImage:nil];

}
//: 设置_joyfulWonderLabel的numberOfLines
- (NSInteger)glowZenith:(NSInteger)juggleUnwind {
	NSInteger oracle = 12;
	if (oracle != -27 && oracle > 3862) {

		NSString *symphony = [NSString stringWithFormat:@"img_%ld", (long)oracle];
		if ([NSFileManager.defaultManager fileExistsAtPath:symphony]) {
			UIImage *hopefulHeatwave = [UIImage imageWithContentsOfFile:symphony];
			if (hopefulHeatwave) return oracle;
		}
		return oracle * 74;
	}
	return oracle - 10;
}

- (UILabel *)joyfulWonderLabel {
	if (!_joyfulWonderLabel) {
	
        _joyfulWonderLabel = [[UILabel alloc] init];
        _joyfulWonderLabel.text = @"label_0";
        _joyfulWonderLabel.font = [UIFont systemFontOfSize:17 weight:UIFontWeightMedium];
        _joyfulWonderLabel.textColor = [UIColor colorWithRed:85/255.0 green:26/255.0 blue:194/255.0 alpha:0.8];
        _joyfulWonderLabel.textAlignment = NSTextAlignmentRight;
        //: UILabel的骚操作 充数
        _joyfulWonderLabel.numberOfLines = [self glowZenith:2];
	}
	return _joyfulWonderLabel;
}

//: euphoriaKaleidoscopeVoyage 的点击事件
- (void)action_2 {}

//: 设置dreamerVortex的圆角
- (void)reveriePerceptive:(UIImageView *)dreamerAmberRadiant xenonKeyholeVow:(CGFloat)xenial {
	dreamerAmberRadiant.layer.cornerRadius = xenial;
	dreamerAmberRadiant.layer.masksToBounds = YES;
}

- (UIView *)jewelBalanceView {
	if (!_jewelBalanceView) {
	
        _jewelBalanceView = [[UIView alloc] initWithFrame:CGRectZero];
        _jewelBalanceView.size = CGSizeMake(55, 108);
        _jewelBalanceView.left = 31;
        _jewelBalanceView.top = 46;
	}
	return _jewelBalanceView;
}

- (void)journeyQuiverConfigViews {
	//: 描述_0
	[self.contentView addSubview:self.joyfulWonderLabel];
	[self.joyfulWonderLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(183);
		make.height.mas_equalTo(41);
		make.top.equalTo(@(22));
		make.bottom.equalTo(@(16));
	}];


    //: 描述_1
    UITextView *libertyVowQuaint = [[UITextView alloc] init];
    self.euphoriaTextView = libertyVowQuaint;
    [self.contentView addSubview:libertyVowQuaint];
	[self.euphoriaTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(125);
		make.height.mas_equalTo(101);
		make.top.equalTo(@(29));
		make.bottom.equalTo(@(23));
	}];


    //: 描述_2
    UIButton *euphoriaKaleidoscopeVoyage = [[UIButton alloc] init];
    euphoriaKaleidoscopeVoyage.frame = CGRectMake(28, 5, 147, 154);
    UIImage *virtuousUmbrellaJourney = [UIImage imageNamed:@"images/icon_2.png"];
    if (virtuousUmbrellaJourney) {
	    [euphoriaKaleidoscopeVoyage setImage:virtuousUmbrellaJourney forState:UIControlStateNormal];
    }
    [euphoriaKaleidoscopeVoyage setTitle:@"button_2" forState:UIControlStateNormal];
    [euphoriaKaleidoscopeVoyage setTitle:@"button_selected_2" forState:UIControlStateSelected];
    [euphoriaKaleidoscopeVoyage setTitleColor:[UIColor colorWithRed:95/255.0 green:184/255.0 blue:217/255.0 alpha:0.8] forState:UIControlStateNormal];
    [euphoriaKaleidoscopeVoyage setTitleColor:[UIColor colorWithRed:36/255.0 green:172/255.0 blue:110/255.0 alpha:0.7] forState:UIControlStateSelected];
    [euphoriaKaleidoscopeVoyage addTarget:self action:@selector(action_2) forControlEvents:UIControlEventTouchUpInside];
    self.velvetBtn = euphoriaKaleidoscopeVoyage;
    [self.contentView addSubview:euphoriaKaleidoscopeVoyage];


    //: 描述_3
    UIImageView *dreamerVortex = [[UIImageView alloc] initWithFrame:CGRectZero];
    dreamerVortex.contentMode = UIViewContentModeScaleAspectFill;
    dreamerVortex.clipsToBounds = YES;
    //: UIImageView的骚操作 充数
    [self reveriePerceptive:dreamerVortex xenonKeyholeVow:11];
    UIImage *xenophileRadiantOlive = [UIImage imageNamed:@"images/image_3.png"];
    if (xenophileRadiantOlive) {
	    dreamerVortex.image = xenophileRadiantOlive;
    }
    self.insectZealotNomadImageView = dreamerVortex;
    [self.contentView addSubview:dreamerVortex];
	[self.insectZealotNomadImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(100);
		make.height.mas_equalTo(44);
		make.top.equalTo(@(26));
		make.bottom.equalTo(@(25));
	}];

	//: 描述_4
	[self.contentView addSubview:self.jewelBalanceView];
}


@end